<div class="widget">
    <div class="widget-header">
        <h3><i class="fa fa-edit"></i> 入库登记-无货物预报信息</h3>
    </div>
    <div class="widget-content">
        <form class="form-horizontal" role="form">
            <div class="form-group">
                <label class="col-sm-2  text-right">客户标示：<span class="required-indicator" style="color:red">*</span></label>
                <div class="col-sm-10 text-left">
                    <input type="text" class="form-control" ng-blur="checkReceiveIdentity()" placeholder="客户标示" id='receiveIdentity' ng-model="data.receiveIdentity"
                        ng-disabled="tpl_status.isExist == true">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2  text-right">客户编号：<span class="required-indicator" style="color:red">*</span></label>
                <div class="col-sm-10 text-left">
                    <input type="text" class="form-control" ng-model="data.customerNumber" ng-disabled="true">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label text-right">快递单号：<span class="required-indicator" style="color:red">*</span></label>
                <div class="col-sm-10 text-left">
                    <input id="txtTrackingNumber" ng-blur="checkInboundPackage()" type="text" class="form-control"  placeholder="快递单号" ng-model="data.trackingNumber"
                        ng-blur="getPackageDetail()">
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label text-right">快递名称：<span class="required-indicator" style="color:red">*</span></label>
                <div class="col-sm-10 text-left">
                    <select class="form-control" id="carrierName" ng-model="data.carrierName" ng-disabled="tpl_status.isExist == true">
                        <option value="DHL">DHL</option>
                        <option value="EMS">EMS</option>
                        <option value="FEDEX">FEDEX</option>
                        <option value="UPS">UPS</option>
                        <option value="其他快递">其他快递</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label text-right">收货仓库：<span class="required-indicator" style="color:red">*</span></label>
                <div class="col-sm-10 text-left">
                    <select class="form-control" id="warehouseNumber" ng-model="data.warehouseNumber"  id='age' ng-disabled="tpl_status.isExist == true" ng-options="item.key as item.value for item in warehouseList">
                    </select>
                </div>

            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label text-right">运单内容：<span class="required-indicator" style="color:red">*</span></label>
                <div class="col-sm-10 text-left">
                    <input type="text" id="packageDescription" class="form-control" placeholder="运单内容" ng-model="data.packageDescription" ng-disabled="tpl_status.isExist == true">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label text-right">运单备注信息：</label>
                <div class="col-sm-10 text-left">
                    <textarea id = "packageNote"  class="form-control" rows="5" cols="30" placeholder="运单备注信息" ng-model="data.packageNote" ng-disabled="tpl_status.isExist == true"></textarea>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2  text-right">包裹重量：<span class="required-indicator" style="color:red">*</span></label>
                <div class="col-sm-10 text-left">
                    <input type="number" id = "packageWeight" class="form-control" placeholder="包裹重量" ng-model="data.packageWeight">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label text-right">仓库备注：</label>
                <div class="col-sm-10 text-left">
                    <textarea class="form-control" id ="warehouseNote" rows="5" cols="30" placeholder="仓库备注" ng-model="data.warehouseNote"></textarea>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-10">
                    <button type="button" class="btn btn-primary role" data-role="88" ng-click="btnSaveAndPrint()" ng-disabled="flag == '0'">登记并打印入库单</button>
                    <button type="button" class="btn btn-primary" ng-click="btnPrev();">返回</button>
                </div>
            </div>
        </form>
    </div>
</div>
<print-inbound-package></print-inbound-package>
<print-helper></print-helper>


<script>

      var receiveIdentity = document.getElementById("receiveIdentity");
      var trackingNumber =  document.getElementById("txtTrackingNumber");
      var carrierName =  document.getElementById("carrierName");
      var warehouseNumber =  document.getElementById("warehouseNumber");
      var packageDescription =  document.getElementById("packageDescription");
      var packageNote =  document.getElementById("packageNote");
      var packageWeight =  document.getElementById("packageWeight");
      var warehouseNote =  document.getElementById("warehouseNote");
            receiveIdentity.onkeydown = function (event) {
                e = event ? event : (window.event ? window.event : null);
                // 按下回车键且输入框值非空时  
                if (e.keyCode == 13 && receiveIdentity.value) {
                    trackingNumber.focus();
                }
            }
             trackingNumber.onkeydown = function (event) {
                e = event ? event : (window.event ? window.event : null);
                // 按下回车键且输入框值非空时  
                if (e.keyCode == 13 && trackingNumber.value) {
                    carrierName.focus();
                }
            }
             carrierName.onkeydown = function (event) {
                e = event ? event : (window.event ? window.event : null);
                // 按下回车键且输入框值非空时  
                if (e.keyCode == 13 && carrierName.value) {
                    warehouseNumber.focus();
                }
            }
             warehouseNumber.onkeydown = function (event) {
                e = event ? event : (window.event ? window.event : null);
                // 按下回车键且输入框值非空时  
                if (e.keyCode == 13 && warehouseNumber.value) {
                    packageDescription.focus();
                }
            }
             packageDescription.onkeydown = function (event) {
                e = event ? event : (window.event ? window.event : null);
                // 按下回车键且输入框值非空时  
                if (e.keyCode == 13 && packageDescription.value) {
                    packageNote.focus();
                }
            }
             packageNote.onkeydown = function (event) {
                e = event ? event : (window.event ? window.event : null);
                // 按下回车键且输入框值非空时  
                if (e.keyCode == 13 && packageNote.value) {
                    packageWeight.focus();
                }
            }
             packageWeight.onkeydown = function (event) {
                e = event ? event : (window.event ? window.event : null);
                // 按下回车键且输入框值非空时  
                if (e.keyCode == 13 && packageWeight.value) {
                    warehouseNote.focus();
                }
            }
            
</script>